const axios = require('axios')

module.exports = class _api {
    constructor(global) {
        this._global = global
    }

    loginByUp(up) {
        return axios.post(this._global.getBaseUrl() + '/login/auth', up, {
            headers: {
                "User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36',
                'Content-Type': 'application/json',
            },
        })
    }

    getInfo(token) {
        return axios.post(this._global.getBaseUrl() + '/login/getInfo', null, {
            headers: {
                "User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36',
                'Content-Type': 'application/json',
                'auths_api': token
            },
        })
    }
}





